-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 TestReconcileMachinePhases: use apireader to directly talk to apiserver #12819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 TestReconcileMachinePhases: use apireader to directly talk to apiserver #12819
Conversation
Hi @ivelichkovich. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Thx! Fine for me to give this a try, but with the surrounding Eventually I don't think this will fix the test flake /ok-to-test |
LGTM label has been added. Git tree hash: fc418d718df1bb39df0ec970b4bc1d6552deaaed
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
LGTM label has been added. Git tree hash: 82d84440065529ebc6c3f58d67f36fd49c0952ca
|
What this PR does / why we need it: reduce flake in envtest test
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #12785
use APIReader with helper Get function. My comment in the issue explains what I'm thinking is going. For some of the flake you can see the logs reconcile so the status must be set to i.e.
Pending
. Instead the phase is empty and reads asUnknown
. Completed reconciliations would set the status and the logs show those completing so the cache must be stale on the check where weGet
the object and validate the status. This adds helper function and uses it for validation where it queries directly against apiserver.Note: comments on APIReader say to use it sparingly. I would not suggest disabling cache in controller clients during testing however for validation of state after a test run is complete it should be safe to use and reduce flake.